import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import Home from '@/components/home'
import Auth from '@/components/authMessage'
import Personal from '@/components/personal'
import Detail from '@/components/visitDetail'
import MyVisit from '@/components/myVisit'
import Info from '@/components/info'
import Edit from '@/components/edit'
import Success from '@/components/success'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      redirect: "/index",
      component: Home,
      children: [{
        path: 'index',
        name: 'Index',
        component: Index,
      },
      {
        path: 'visit',
        name: 'MyVisit',
        component: MyVisit,
      },
      {
        path: 'personal',
        name: 'Personal',
        component: Personal,
      },
      {
        path: 'detail',
        name: 'Detail',
        component: Detail,
      },
      {
        path: 'info',
        name: 'Info',
        component: Info,
      },
      {
        path: 'edit',
        name: 'Edit',
        component: Edit,
      }
      
      ]
    },
    {
      path: '/auth',
      name: 'Auth',
      component: Auth
    },
    {
      path: '/success',
      name: 'Success',
      component: Success
    },
  ]
})
